export default "\nuniform vec2 u_translate;\nuniform float u_R;\nuniform float u_lon0;\n\nconst vec2 BOUNDS = vec2(PI, PI / 2.0);\n\n/** @returns (lon, lat) in radians for the specified point (x, y), or (NIL, NIL) if the point is unprojectable. */\nvec2 invert(in vec2 point) {\n    // translate and scale\n    vec2 p = (point - u_translate) / u_R;\n    if (all(lessThanEqual(abs(p), BOUNDS))) {\n        // project\n        float lambda = p.x;\n        float phi = p.y;\n        // rotate\n        float lon = lambda - u_lon0;\n        float lat = phi;\n        return vec2(lon, lat);\n    }\n    return vec2(NIL);  // outside of projection\n}\n";